#include "QCefNcwWidget.h"

QCefNcwWidget::QCefNcwWidget(QWidget * parent, Qt::WindowFlags flags)
    : QCefWidget{parent, flags}
{
    QCEF_DEBUG();
}

QCefNcwWidget::QCefNcwWidget(const QString & strUrl, QWidget * parent, Qt::WindowFlags flags)
    : QCefWidget{strUrl, parent, flags}
{
    QCEF_DEBUG();

    //m_strFirstUrl = strUrl;
    //createContainer();
    //createClient();
}

QCefNcwWidget::~QCefNcwWidget()
{
    QCEF_DEBUG();
}

int QCefNcwWidget::createClient()
{
    if (m_delegate == nullptr)
    {
        m_delegate = new QCefNcwDelegate(this);
        m_client = new QCefNcwClient(QCefBrowserApp::instance());

        m_delegate->setOperator(this);
        m_client->setDelegate(m_delegate);
    }

    return 0;
}
